<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang=en><![endif]-->
<!--[if IE 7]><html class="no-js ie7 oldie" lang=en><![endif]-->
<!--[if IE 8]><html class="no-js ie8 oldie" lang=en><![endif]-->
<!--[if gt IE 8]><!-->
<html class=no-js lang=en>
<!--<![endif]-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta name='robots' content='noindex,nofollow' />
<title>Admin Login</title>
<link href="__PUBLIC__/css/style.css" rel="stylesheet" type="text/css" />
<load href="__PUBLIC__/js/jquery-1.7.1.min.js" />
<load href="__PUBLIC__/js/jquery.validate.js" />
<load href='__PUBLIC__/js/jquery.metadata.js' />
<load href='__PUBLIC__/js/jquery.form.js' />
<load href='__PUBLIC__/js/jquery-ui.js' />
<load href='__PUBLIC__/js/common.js' />
</head>
<style>
.comm{ display:none; font-size:12px; font-family:"微软雅黑";  position:relative; left:10px; font-weight:bold; }
#login_error,#regist_error,#regist_error_email{color:#F00; }
#login_success,#regist_success,#regist_success_to,.ok{ color:#090;}
.ren{color:#F00;}
</style>
<body class="special_page">
<div class="top">
  <div class="gradient"></div>
  <div class="white"></div>
  <div class="shadow"></div>
</div>
<div class="content">
  <h1> | </h1>
  <div class="background"></div>
  <div class="wrapper showf">
    <div class="box">
      <div class="header grey"><img src="__PUBLIC__/images/lock.png" width="16" height="16">
        <h3>用户登录</h3>          
<div id="login_error" class="comm">用户名或者密码不正确！</div>
<div id="login_success" class="comm">正在登录中...... <img src="__ROOT__/Public/images/loading2.gif" alt="loading..." /></div>
      </div>
 <form action="__URL__/doLogin" name="login" id="login_form" method="post">
        <div class="content no-padding with-actions grey">
          <div class="section _100">
            <label> 邮箱： </label>
            <div>
              <input name="email" class="required" value="">
            </div>
          </div>
          <div class="section _100">
            <label> 密码： </label>
            <div>
              <input name="password" class="required" type="password">
            </div>
          </div>
        </div>
        <div class="actions">
          <div class="actions-left" style="margin-top:10px;">
            <label for="newsletter">
            <a href="javascript:void(0);" onclick="$('.showf').hide(),$('.showf-h').slideDown('slow'),$('.alert').hide()">忘记密码?</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="$('.showf').hide(),$('.showf-r').slideDown('slow'),$('.alert').hide()">注册</a>
            </label>
          </div>
          <div class="actions-right">
            <input value="登录" type="submit">
          </div>
        </div>
      </form>
    </div>
    <div class="shadow"></div>
  </div>
  <div class="wrapper showf-h" style="display:none;">
    <div class="box">
      <div class="header grey"><img src="__PUBLIC__/images/lock.png" width="16" height="16">
        <h3>找回密码</h3>          
<div id="email_error" class="comm ren">没有该邮件！</div>
<div id="send_success" class="comm ok">请登录注册邮箱修改密码！</div>
<div id="send_error" class="comm ren">修改密码邮件发送失败！</div>
<div id="login_success" class="comm">正在登录中...... <img src="__ROOT__/Public/images/loading2.gif" alt="loading..." /></div>
      </div>
 <form action="__URL__/doFindPsw" name="login" id="psw_form" method="post" autocomplete="off" novalidate="novalidate" >
        <div class="content no-padding with-actions grey">
          <div class="section _100">
            <label> 邮箱： </label>
            <div>
              <input name="email" class="required" value="">
            </div>
          </div>
        </div>
        <div class="actions">
          <div class="actions-left">
            <label for="newsletter">
            <input onclick="$('.showf-h').hide(),$('.showf').slideDown('slow')" value="返回" type="button">
            </label>
          </div>
          <div class="actions-right">
            <input value="提交" type="submit">
          </div>
        </div>
      </form>
    </div>
    <div class="shadow"></div>
  </div>
  
  <div class="wrapper showf-r" style="display:none;">
    <div class="box">
      <div class="header grey"><img src="__PUBLIC__/images/lock.png" width="16" height="16">
        <h3>用户注册</h3>          
<div id="regist_error" class="comm">注册失败！请重新输入！</div>
<div id="regist_error_email" class="comm">邮箱已存在！请重新输入！</div>
<div id="regist_success" class="comm">正在提交，请稍等...... <img src="__ROOT__/Public/images/loading2.gif" alt="loading..." /></div>
<div id="regist_success_to" class="comm">恭喜您，注册成功！正在为您跳转....... <img src="__ROOT__/Public/images/loading2.gif" alt="loading..." /></div>
      </div>
 <form action="__URL__/doRegist" name="login" id="regist_form" method="post"  >
        <div class="content no-padding with-actions grey">
          <div class="section _100">
            <label> 邮箱： </label>
            <div>
              <input name="email" class="required" value="">
            </div>
          </div>
          <div class="section _100">
            <label> 密码： </label>
            <div>
              <input name="password" id="password" class="required" type="password">
            </div>
          </div>
          <div class="section _100">
            <label> 确认密码： </label>
            <div>
              <input name="repassword" id="repassword" class="required" type="password">
            </div>
          </div>        </div>
        <div class="actions">
          <div class="actions-left">
            <label for="newsletter">
            <input onclick="$('.showf-r').hide(),$('.showf').slideDown('slow')" value="返回" type="button">
            </label>
          </div>
          <div class="actions-right">
            <input value="注册提交" type="submit">
          </div>
        </div>
      </form>
    </div>
    <div class="shadow"></div>
  </div>
</div>
<script>
    $(window).load(function() {
        var b = $("#psw_form").validate({
            rules: {
                email: {
                    required: true,
                    email: true
                }
            },
            messages: {
                email:{
                    required:"请输入邮箱",
                    email:"您输入的邮箱格式不对"
                }
            },
            showErrors: function(c, d) {
                this.defaultShowErrors();
                var c = this;
                $.each(d,
                function() {
                        var f = $(this.element);
                        var e = f.parent().find("label.error").hide();
                        e.addClass("red");
                        e.css("width", "");
                        f.trigger("labeled");
                        e.fadeIn()
                })
            },
            submitHandler:function(form){
                $('#psw_form').ajaxSubmit(options);
            }
        });
        var a = $("#login_form").validate({
		rules: {
			password: "required",
			email: {
				required: true,
				email: true
			},
		},
		messages: {
			password: "请输入密码",
			email: {
					required:"请输入邮箱",
					email:"您输入的邮箱格式不对",
			},
		},			
		invalidHandler: function(d, b) {
			var e = b.numberOfInvalids();
			if (e) {
				var c = e == 1 ? "您有 1 处还没有填.": "您有 " + e + " 处还没有填.";
				$(".box .content").removeAlertBoxes();
				$(".box .content").alertBox(c, {
					type: "warning",
					icon: true,
					noMargin: false
				});
				$(".box .content .alert").css({
					width: "",
					margin: "0",
					borderLeft: "none",
					borderRight: "none",
					borderRadius: 0
				})
			} else {
				$(".box .content").removeAlertBoxes()
			}
		},
		showErrors: function(c, d) {
			this.defaultShowErrors();
			var b = this;
			$.each(d,
			function() {
				var f = $(this.element);
				var e = f.parent().find("label.error").hide();
				e.addClass("red");
				e.css("width", "");
				f.trigger("labeled");
				e.fadeIn()
			})
		},
		submitHandler:function(form){
                    $('#login_form').ajaxSubmit(options);
		}
	})
		
		var options = { 
		success: showResponse,
		clearForm: true,
		timeout: 10000,
		error: function(){
				alert('Error loading XML document');
			}
		}
		function showResponse(responseText, statusText, xhr, $form)
		{ 
			if(responseText==1)
			{
				$('#login_success').show('slow').delay(2000).slideDown();
				setTimeout('window.location="__APP__"',3000);
			}else if(responseText==2)
				{
					$('#email_error').show('slow').delay(3000).slideUp();
					return false;
				}
				else if(responseText==3)
				{
					$('#send_success').show('slow').delay(10000).slideUp();
					return false;
				}
				else if(responseText==4)
				{
					$('#send_error').show('slow').delay(3000).slideUp();
					return false;
				}
			else
			{
				$('#login_error').show('slow').delay(3000).slideUp();
				return false;
			}
		} 
		
		$('#login_form input').keydown(function(e)
		{
			if (e.keyCode == 13) {
				$('#login_form').submit();
			}
		});		
    });
	
</script>

<script>
    $(window).load(function() {
        var a = $("#regist_form").validate({
		rules: {
			password:"required",
			repassword:{
				required: true,
				equalTo: "#password"	
			},
			email: {
				required: true,
				email: true
			},
		},
		messages: {
			password:"请输入密码",
			repassword: {
				required: "请再次输入密码",
				equalTo: "密码不匹配"	
			},
			email: {
					required:"请输入邮箱",
					email:"您输入的邮箱格式不对",
			},
		},			
		invalidHandler: function(d, b) {
			var e = b.numberOfInvalids();
			if (e) {
				var c = e == 1 ? "您有 1 处还没有填.": "您有 " + e + " 处还没有填.";
				$(".box .content").removeAlertBoxes();
				$(".box .content").alertBox(c, {
					type: "warning",
					icon: true,
					noMargin: false
				});
				$(".box .content .alert").css({
					width: "",
					margin: "0",
					borderLeft: "none",
					borderRight: "none",
					borderRadius: 0
				})
			} else {
				$(".box .content").removeAlertBoxes()
			}
		},
		showErrors: function(c, d) {
			this.defaultShowErrors();
			var b = this;
			$.each(d,
			function() {
				var f = $(this.element);
				var e = f.parent().find("label.error").hide();
				e.addClass("red");
				e.css("width", "");
				f.trigger("labeled");
				e.fadeIn()
			})
		},
		submitHandler:function(form){
				$('#regist_form').ajaxSubmit(options);
		}
	})
		
		var options = { 
		success: showResponse,
		clearForm: true,
		timeout: 10000,
		error: function(){
				alert('Error loading XML document');
			}
		}
		function showResponse(responseText, statusText, xhr, $form)
		{ 
			if(responseText==1)
			{
				$('#regist_success').show().delay(2000).slideUp();
				$('#regist_success_to').hide().delay(2000).slideDown();
				setTimeout('window.location="__APP__"',5000);
			}
			else if(responseText==2)
			{
				$('#regist_error_email').show('slow').delay(3000).slideUp();
				return false;
			}
			else
			{
				$('#regist_error').show('slow').delay(3000).slideUp();
				return false;
			}
		}		
	})
	
		$('#regist_form input').keydown(function(e)
		{
			if (e.keyCode == 13) {
				$('#login_form').submit();
			}
		});		
</script>
<div id="fallr-overlay"></div>
</body>
</html>